Skip to content

webhook-gateway: integration-level delivery config - #9997

Merged
shu-hui-cash merged 5 commits into
wh-ingress-gw-spikefrom
shu-hui-cash/integration-delivery-config
Nov 27, 2026
Merged

shu-hui-cash merged 5 commits into
wh-ingress-gw-spikefrom
shu-hui-cash/integration-delivery-config

Conversation

@shu-hui-cash

Copy link
Copy Markdown
Contributor

Why?

The webhook gateway design puts each webhook's configuration on the integration, owned by one channel: how deliveries find their channels, what message they post, its card data, and the key that groups related deliveries. Until now the only rendering setting, the message template, sat on each subscription. Subscribers could post different text for one webhook, and the other fields had nowhere to live. This change gives the integration a single config, so the routing, card and threading work that follows has a fixed place to read it from.

Summary

  • webhook_gateway_integrations gains delivery_mode, channel_expr, message_expr, message_data_expr and group_key_expr; webhook_gateway_subscriptions loses message_template.
  • The integration PUT accepts and returns these fields, checks every expression when it's written, and includes the whole config in the operation fingerprint. The subscription PUT now accepts only a filter.
  • Fan-out renders the integration's message_expr once per delivery for every matching subscription. The other fields are stored and checked but not yet used in delivery.
  • The columns are added to migrations 0001 and 0003 directly, since the gateway schema isn't deployed anywhere yet.
  • Management tests moved to management/tests.rs, and the README covers the new fields.

🤖 Generated with Claude Code

shu-hui-cash and others added 3 commits November 27, 2026 12:19
Move the message expression from each subscription to the integration
as message_expr, and store the rest of the design's webhook config next
to it: delivery_mode, channel_expr, message_data_expr and group_key_expr.
The management API checks each expression when it is written and
fingerprints the whole config for operation replays. Delivery still fans
out to subscriptions and only message_expr affects what is posted.

The columns go into migrations 0001 and 0003 directly because the
gateway schema is not deployed anywhere yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Shu Hui <shu@squareup.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Shu Hui <shu@squareup.com>
Renames check_program to check_expression and the management API's invalid_program error to invalid_expression, matching the *_expr fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Shu Hui <shu@squareup.com>
@shu-hui-cash
shu-hui-cash marked this pull request as ready for review November 27, 2026 03:38
@shu-hui-cash
shu-hui-cash requested a review from a team as a code owner November 27, 2026 03:38
@shu-hui-cash
shu-hui-cash merged commit a981324 into wh-ingress-gw-spike Nov 27, 2026
83 checks passed
@shu-hui-cash
shu-hui-cash deleted the shu-hui-cash/integration-delivery-config branch November 27, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant